1. Field of the Invention
The present invention generally relates to a data reading or reusing method for motion estimation, and more particularly, to a data reading or reusing method for motion estimation in an embedded system.
2. Description of Related Art
Along with the widespread of the Internet and the advancement of multimedia transmission techniques, digital video communication has become a very important part in our daily life. Generally speaking, a digital video carries a large quantity of data. Accordingly, a digital video has to be compressed in order to reduce the space required for storing the digital video and the bandwidth for transmitting the digital video. An advanced digital video compression technique should be adopted to fully utilize the limited transmission bandwidth and to transmit the most digital videos of the highest quality. H.264 is one of the most advanced video compression techniques and which is established by the International Telecommunication Union (ITU) Video Coding Experts Group (VCEG) together with the International Organization for Standardization (ISO)/International Electrotechnical Commission (IEC) Moving Picture Experts Group (MPEG).
Even though the H.264 technique offers very good compression rate and compression quality, since it supports different block configurations and multiple references, the calculation load thereof is enormous, and at least 80% of the calculation load is for motion estimation.
FIG. 1 illustrates the conventional motion estimation in video compression. Referring to FIG. 1, when motion estimation is carried out, a current frame CF is compared with a previous frame PF. The current frame CF is usually divided into a plurality of sub frames, wherein the sub frames include a sub frame PM, and the position of the sub frame PM in the current frame CF is represented with the coordinates (u, v). After that, the sub frames in the current frame CF are sequentially selected. Whether there is any sub frame in the previous frame PF similar to the selected sub frame PM is then determined. A sub frame PS in the previous frame PF corresponding to the sub frame PM in the current frame CF is considered the center of the previous frame PF (i.e., the position of the sub frame PS in the previous frame PF is also represented with the coordinates (u, v)). The area within a predetermined distance d around the sub frame PS is referred to as a search window SW, and the predetermined distance is referred to as a search range. Sub frames are randomly selected within the search window and compared with the sub frame PM to find the most similar sub frame, and this action is called motion estimation.
It should be mentioned that the motion estimation requires a large quantity of data to be read and accordingly a good data reading and reusing method should be adopted to reduce the calculation load and memory usage and to maintain the compression quality.